Probability of dxl read from text file, then do the filtering and exprot the data to excel?

I wanna write a batch file, then run the DOORS and open the module. Then run a .dxl  and do the filtering and then export to an excel sheet. the filter condition is read from a text file.

All I need to do is to enter the filter conditions to a text file, then click the batch file.

Is it possible to do that? If so, could any one give me an idea? I've been search this thing for a long time and wanna get it done.

Thanks.


JingC - Fri May 31 14:39:49 EDT 2013

Re: Probability of dxl read from text file, then do the filtering and exprot the data to excel?
llandale - Fri May 31 14:51:39 EDT 2013

Lets say the text file will have filter using the exact syntax DOORS understands.  Then this should work:

  • string sFilter = readFile("c:/MyDoorsStuff/MyFiles/BatchFilter.txt")
  • Filter filt = filter(sFilter)

I'm not sure "Filters" work in "batch" files since a "Filter" is a visual thing and "batch" doesn't load the DOORS GUI.

-Louie

Re: Probability of dxl read from text file, then do the filtering and exprot the data to excel?
JingC - Fri May 31 16:00:28 EDT 2013

llandale - Fri May 31 14:51:39 EDT 2013

Lets say the text file will have filter using the exact syntax DOORS understands.  Then this should work:

  • string sFilter = readFile("c:/MyDoorsStuff/MyFiles/BatchFilter.txt")
  • Filter filt = filter(sFilter)

I'm not sure "Filters" work in "batch" files since a "Filter" is a visual thing and "batch" doesn't load the DOORS GUI.

-Louie

Thanks for replying, Louie. First of all, I tried to run a .dxl in a batch mode, but I failed. How can I make it happen?

Re: Probability of dxl read from text file, then do the filtering and exprot the data to excel?
BillTidy - Mon Jun 03 08:36:40 EDT 2013

Filters work in DXL, either batch or interactive, not a problem.

To run dxl in batch you need to set the DOORS environment variables in your bat (or windows cmd) file then do something like...

%DOORSBIN%\doors.exe -H %DOORSHOME% -d %DOORS_SERVER% -user %DOORS_USER% -password %DOORS_PASS% -defopenmode "READ_ONLY" -defopenlinkmode "READ_ONLY" -batch %BATCH_SCRIPT_PATH%

You need to supply the DOORS server details and a userid and pwd. It is best to default to open formal and link modules in readonly mode so your batch doesn't get blocked waiting for edit access (only applicable if you're only reading data in your batch script) and you need to specify that you're running your dxl script in batch mode and then provide the fullpath to the dxl script.

Re: Probability of dxl read from text file, then do the filtering and exprot the data to excel?
JingC - Mon Jun 03 16:57:45 EDT 2013

BillTidy - Mon Jun 03 08:36:40 EDT 2013

Filters work in DXL, either batch or interactive, not a problem.

To run dxl in batch you need to set the DOORS environment variables in your bat (or windows cmd) file then do something like...

%DOORSBIN%\doors.exe -H %DOORSHOME% -d %DOORS_SERVER% -user %DOORS_USER% -password %DOORS_PASS% -defopenmode "READ_ONLY" -defopenlinkmode "READ_ONLY" -batch %BATCH_SCRIPT_PATH%

You need to supply the DOORS server details and a userid and pwd. It is best to default to open formal and link modules in readonly mode so your batch doesn't get blocked waiting for edit access (only applicable if you're only reading data in your batch script) and you need to specify that you're running your dxl script in batch mode and then provide the fullpath to the dxl script.

I want to export the data from current module according to the filters now. Do i need to open the module or just use the path like "\ABC\cde" to access the modules and skip the GUI?

Re: Probability of dxl read from text file, then do the filtering and exprot the data to excel?
llandale - Tue Jun 04 12:31:32 EDT 2013

BillTidy - Mon Jun 03 08:36:40 EDT 2013

Filters work in DXL, either batch or interactive, not a problem.

To run dxl in batch you need to set the DOORS environment variables in your bat (or windows cmd) file then do something like...

%DOORSBIN%\doors.exe -H %DOORSHOME% -d %DOORS_SERVER% -user %DOORS_USER% -password %DOORS_PASS% -defopenmode "READ_ONLY" -defopenlinkmode "READ_ONLY" -batch %BATCH_SCRIPT_PATH%

You need to supply the DOORS server details and a userid and pwd. It is best to default to open formal and link modules in readonly mode so your batch doesn't get blocked waiting for edit access (only applicable if you're only reading data in your batch script) and you need to specify that you're running your dxl script in batch mode and then provide the fullpath to the dxl script.

I agree one should change the 2 default open modes to "READ_ONLY", but that only matters when users double-click on a module; something that never happens in DXL.  DXL always issues explicit read/edit/share commands.

If the user wants to export the "current" module, then one should not use "batch" but instead invoke a DXL, in a mode I call "on-demand", such as using a pull-down menu.  Perhaps you want to save the name of the current view; read the file, set the filter, do the export, then re-load the original view.

-Louie

However, I dislike "filters" with a passion.  I just figure out the criteria, then plow through all objects in the module, and if it qualifies export it.

Re: Probability of dxl read from text file, then do the filtering and exprot the data to excel?
JingC - Tue Jun 04 17:07:41 EDT 2013

llandale - Tue Jun 04 12:31:32 EDT 2013

I agree one should change the 2 default open modes to "READ_ONLY", but that only matters when users double-click on a module; something that never happens in DXL.  DXL always issues explicit read/edit/share commands.

If the user wants to export the "current" module, then one should not use "batch" but instead invoke a DXL, in a mode I call "on-demand", such as using a pull-down menu.  Perhaps you want to save the name of the current view; read the file, set the filter, do the export, then re-load the original view.

-Louie

However, I dislike "filters" with a passion.  I just figure out the criteria, then plow through all objects in the module, and if it qualifies export it.

I agree with you Louie.

The batch mode just invokes a DXL, and my DXL can read the filter info for a specific module from a text file.

How could I apply the filters to the specific module by just running the DXL and then export it to excel file? Had anyone ever tried this and can I have a look at your DXL? and Does any others have ideas?